How to close a module without prompting to save changes in DXL

I've tried using the close mod, false command to close a module without saving changes. Regardless of whether I set the second argument to true or false, I always get prompted. As part of an abort sequence in my script, I want to close the module without saving any changes and not prompt the user. Please tell me the proper syntax for this. Thanks!!

Kind regards,
John
Jagtattoo - Tue Apr 05 12:40:42 EDT 2011

Re: How to close a module without prompting to save changes in DXL
llandale - Tue Apr 05 13:07:27 EDT 2011

close mod, false
is the same as
close(mod); false

you want:
close(mod, false)

  • Louie

Re: How to close a module without prompting to save changes in DXL
Jagtattoo - Tue Apr 05 13:36:07 EDT 2011

llandale - Tue Apr 05 13:07:27 EDT 2011
close mod, false
is the same as
close(mod); false

you want:
close(mod, false)

  • Louie

Super Louie. That worked. Thanks for the correction. I figured it had to be syntax, but didn't know what to try. Hope I can help you out equally some day.

Kind regards,
John

Re: How to close a module without prompting to save changes in DXL
llandale - Wed Apr 06 13:19:12 EDT 2011

Jagtattoo - Tue Apr 05 13:36:07 EDT 2011
Super Louie. That worked. Thanks for the correction. I figured it had to be syntax, but didn't know what to try. Hope I can help you out equally some day.

Kind regards,
John

Functions with a single parameter don't need the parenthesis. These are the same:
... mTarget = module fullName target oTarget
... mTarget = module(fullName(target(oTarget)))

... because of the right-to-left precedent.

But functions with two or more parameters must have the parenthesis.

With few exceptions I put empty parenthesis after functions with zero parameters to make sure that I can recognize it as a function.
... CanDoIt = CanEditModule()... makes more sense to me than:
... CanDoIt = CanEditModule ... Is that a function or a constant?

With few exceptions I put parenthesis for one-parameter functions, just makes it easier for me to read it later.

These last two are obviously minority opinions.
 

  • Louie


And then the silliest thing I think I've ever seen in language syntax: the function-parenthesis-pair is ignored for functions with a single string parameter.

 

... This        print GetShortName(NameFull) "\t" CountObjects "\n"
... is same as  print GetShortName NameFull  "\t" CountObjects "\n"
... and same as print GetShortName(NameFull  "\t" CountObjects "\n")
... Do this:     print(GetShortName(NameFull))"\t" CountObjects "\n"
... or this:     print(GetShortName NameFull) "\t" CountObjects "\n"
 
That particular bug has bitten me countless times.  ..err.. not a 'bug', a 'feature'.